package com.easy.project.controller.system;

import com.easy.project.base.result.BizResult;
import com.easy.project.domain.dto.system.RoleMenuDTO;
import com.easy.project.service.system.ISysRoleMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 系统角色菜单关联表 前端控制器
 * </p>
 *
 * @author wxz
 * @since 2024-01-11
 */
@RestController
@RequestMapping("/sys-role-menu-po")
@Api(tags = "系统管理-角色和菜单关系")
public class SysRoleMenuController {

    @Resource
    private ISysRoleMenuService sysRoleMenuService;

    @PostMapping("/role/menu")
    @ApiOperation(value = "角色和菜单关联")
    public BizResult<Void> roleMenu(@Validated RoleMenuDTO roleMenuDTO){
        sysRoleMenuService.roleMenu(roleMenuDTO);
        return BizResult.success();
    }
}
